package com.example.springLearning.part3.controller;

import com.example.springLearning.part3.service.ServiceImpl;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/spring/part3")
public class HelloWorldController {

    @Resource(name = "aService")
    private ServiceImpl service;

    @RequestMapping(path = "hi", method = RequestMethod.GET)
    public String hi() {
        return "hello world, service is : " + service;
    }
}
